﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
dim id,name,logo,url,description,theorder,act,rsa,sqla
name=HTMLEncode(request.Form("name"))
theorder=HTMLEncode(request.Form("theorder"))
logo=HTMLEncode(request.Form("logo"))
url=HTMLEncode(request.Form("url"))
description=HTMLEncode(request.Form("description"))
act=HTMLEncode(request.Form("act"))
id=HTMLEncode(request.Form("id"))
If Not isNumber(theorder) Then
	theorder=0
End If 
If act="addsave" Then 
	Set rsa = Server.CreateObject("ADODB.Recordset")
	sqla = "select * from [c_friendlink]"
	rsa.open sqla,conn,1,3
	rsa.addnew
	rsa("name")=name
	rsa("url")=url
	rsa("theorder")=theorder
	rsa("logo")=logo
	rsa("description")=description
	rsa.update
	rsa.close
	Set rsa=Nothing 
	response.redirect("showmsg.asp?from=friendlink_list.asp&msg=AddSuccess")
End If 
If act="modifysave" Then 
	Set rsa = Server.CreateObject("ADODB.Recordset")
	sqla = "select * from [c_friendlink] where id="&id
	rsa.open sqla,conn,1,3
	rsa("name")=name
	rsa("url")=url
	rsa("theorder")=theorder
	rsa("logo")=logo
	rsa("description")=description
	rsa.update
	rsa.close
	response.redirect("showmsg.asp?from=friendlink_list.asp&msg=ModifySuccess")
End If 
%>